package com.blockmeta.bbs.businesslibrary.pojo;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

import java.util.List;

/**
 * Created by author on 2017/12/26.
 */

public class HomeRankListPOJO {

    private String time;
    private List<ListBean> list;

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements Parcelable{
        /**
         * change : 1.35
         * circulating_supply : 16803900.0
         * name : Bitcoin
         * price : 13856.20
         * symbol : BTC
         * total : 232,838,199,180
         * volume : 11,199,800,000
         */

        private String change;
        private String circulating_supply;
        private String name;
        private String price;
        private String symbol;
        private String total;
        private String volume;
        private boolean hold_support;
        private boolean github_support;
        private String coin_key;


        private String index;

        protected ListBean(Parcel in) {
            change = in.readString();
            circulating_supply = in.readString();
            name = in.readString();
            price = in.readString();
            symbol = in.readString();
            total = in.readString();
            volume = in.readString();
            hold_support=in.readByte() !=0;
            github_support = in.readByte() !=0;
            coin_key = in.readString();
            index = in.readString();
        }

        public ListBean(){

        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel in) {
                return new ListBean(in);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };

        public String getChange() {
            return change;
        }

        public void setChange(String change) {
            this.change = change;
        }

        public String getCirculating_supply() {
            return circulating_supply;
        }

        public void setCirculating_supply(String circulating_supply) {
            this.circulating_supply = circulating_supply;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPrice() {
            return TextUtils.isEmpty(price)?"0":price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getSymbol() {
            return symbol;
        }


        public void setSymbol(String symbol) {
            this.symbol = symbol;
        }

        public String getTotal() {
            return total;
        }

        public void setTotal(String total) {
            this.total = total;
        }

        public String getVolume() {
            return TextUtils.isEmpty(volume)?"0":volume;
        }

        public void setVolume(String volume) {
            this.volume = volume;
        }


        public boolean isHold_support() {
            return hold_support;
        }

        public boolean isGithub_support() {
            return github_support;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }

        public String getCoin_key() {
            return coin_key;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel parcel, int i) {
            parcel.writeString(change);
            parcel.writeString(circulating_supply);
            parcel.writeString(name);
            parcel.writeString(price);
            parcel.writeString(symbol);
            parcel.writeString(total);
            parcel.writeString(volume);
            parcel.writeByte((byte) (hold_support?1:0));
            parcel.writeByte((byte) (github_support?1:0));
            parcel.writeString(coin_key);
            parcel.writeString(index);
        }
    }
}
